package cz.schovjan.proj.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.SessionAttributes;

/**
 * Vychozi kontroler pro indexovou stranku a stranku about.
 * @author schovjan
 *
 */
@Controller
@SessionAttributes("user")
public class DefaultController extends Base {
	
	/** vychozi stranka */
	private static final String INDEX = "index";
	
	/** stranka o aplikaci */
	private static final String ABOUT = "about";
	
	
	/////////////////
	//OBSLUZNE FUKNCE ------------------------------------------------------------
	/////////////////
	
	
	/**
	 * Index
	 * @param model
	 * @return
	 */
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String index(ModelMap model) {
		return INDEX;
	}

	
	/**
	 * Stranka o aplikaci.
	 * @param model
	 * @return
	 */
	@RequestMapping(value="/about")
	public String about(ModelMap model) {

		return ABOUT;
	}
	
} 